package edu.hitwh.config;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import edu.hitwh.wrapper.Resp;

@RestControllerAdvice
public class Advisor {
    @ExceptionHandler(Exception.class)
    public <T> Resp<T> handleException(Exception e) {
        e.printStackTrace();
        return Resp.fail(e.getMessage());
    }
}
